Adding package management infrastructure - #21564
Conversation
|
Regarding the adaptation of We would then add Of course, we'd still need to make sure that |
6fd2b26 to
fd3edd8
Compare
|
fd3edd8 to
5f9a342
Compare
Good point, I now only add
Yeah, maybe. I was thinking of
Yeah, I think they probably should, yes. I initially thought of the cmxs output as a way to get external dependencies, for example in |
|
Regarding adding a |
if "has the has" is meant to be "contains the hash" then yes |
Oups, I edited the comment. |
5f9a342 to
0fd9ef3
Compare
|
I've now added the |
0fd9ef3 to
52646c6
Compare
|
@SkySkimmer what do you think should be the next steps here? Should I make it so that It's also not clear to me how to make tests for this PR. Any recommendation on that front? |
|
I still don't understand what the transition is supposed to look like. |
|
That seems like the easiest thing to do (potentially using symbolic links instead of actual copies, but that might lead to problems). Do you see another alternative? |
|
I don't think the argument parsing in coqproject_file and coqargs are the right places to call resolve. Is findlib even initialized when we're in that code?
test-suite/coq-makefile and test-suite/misc have tests which are arbitrary scripts
If we have copies (including symbolic links) won't they get detected as conflicts? eg Require Prelude would say "found prelude.vo in lib/coq/theories/... and lib/rocq-core/..." |
I guess that any particular project you should not rely both on packages and on Do you think something like that could work? |
|
Do we really want to force the transition order like that? |
|
I think this would be OK if package that have transitioned can be depended on by packages that have not, which would simply mean double-installing everything. To me, it seems fine to require that a package can only transition if all its dependencies have. |
|
also isn't part of the point of this system that we can multiple packages using the same logical paths? but such packages can't be double installed |
|
Yeah, that's a good point. I guess they can't right now, so at least that's not a regression. We can only get that benefit when the legacy installation method is removed I guess. |
|
If we installed only once, we could have coqdep/coqc implicitly add -Q for all findlib packages if no -package is used. This may break dune though. |
52646c6 to
9a4ae80
Compare
f3bc9b2 to
08960a6
Compare
|
@coqbot run full ci |
SkySkimmer
left a comment
There was a problem hiding this comment.
should be ready AFAICT assuming CI doesn't suddenly break
8502188 to
d7e43b7
Compare
|
@coqbot run full ci |
Sorry, I had not seen this message when I last pushed. I have extended the docs with explanations of the new installation layout. |
| They can be combined:: | ||
|
|
||
| $ rocq find -Q -I my-package | ||
| -Q '/path/to/lib/my-package/rocq.d' MyPackage |
There was a problem hiding this comment.
what's the quoting here? (ocaml, shell, other?)
There was a problem hiding this comment.
It's using Filename.quote, whose documentation starts with the following.
Return a quoted version of a file name, suitable for use as one argument in a command line, escaping all meta-characters.
|
@coqbot merge now |
Fixing an unfortunate variable overlap from rocq-prover#21564
Fixing an unfortunate variable overlap from rocq-prover#21564
This PR implement rocq-prover/rfcs#101, whose goal is to add a proper notion of Rocq package (piggy-backing on
findlib), setting a path towards the eventual removal of the infamouscoq/user-contribdirectory. This was discussed in a Rocq Call.Summary of the changes
rocq c,rocq dep, ...) now accept a-package <pkg>argument (similar to that ofocamlfind).rocq findcommand was added to list installed packages (directory and Rocq module path), and allowing to obtain the necessary-Q/-Iflags for a given list of packages (or all of them).CorelibandLtac2libraries are installed twice: once undercoq/user-contribfor backwards compatibility, and once as Rocq packages.rocq makefilecommand now takes a--rocq-package <pkgname>argument which can be used to request the use of the new package infrastructure (not using it is deprecated), together with dependencies specified via-package. A--legacy-supportflag can be used to also install undercoq/user-contrib.Testing done
Correct Rocq install
Checked that Rocq installs correctly with the new installation scheme, including Rocq packages
rocq-coreandrocq-core.ltac2that can be requested as packages.Correct
rocq-stdlibinstallChecked that the Rocq standard library can be ported to the new system (via
rocq makefile), and installs correctly after applying the following changes.Correct
bignumsinstallChecked that a simple plugin (
bignums) builds and install correctly usingrocq makefileafter the following changes.Ensured that this can work with dune
Opened a dune PR that enables using the new installation scheme from dune projects. This dune version was tested using ports of
equations,rocq-stdpp, androcq-iris. And also a composed build of the latter two.